package com.wufeng.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wufeng.dto.KnowledgeUserDto;
import com.wufeng.entity.Knowledge;
import com.wufeng.entity.User;
import com.wufeng.service.KnowledgeService;
import com.wufeng.mapper.KnowledgeMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author Hxh
* @description 针对表【knowledge】的数据库操作Service实现
* @createDate 2024-03-28 01:24:46
*/
@Service
public class KnowledgeServiceImpl extends ServiceImpl<KnowledgeMapper, Knowledge>
    implements KnowledgeService{

    @Autowired
    private KnowledgeMapper knowledgeMapper;
    @Override
    public List<KnowledgeUserDto> getKnowledgeListByConditions(Knowledge knowledge, Integer pageIndex, Integer pageSize) {
        Integer startIndex = (pageIndex-1) * pageSize;
        return knowledgeMapper.getKnowledgeListByConditions(knowledge,startIndex, pageSize);
    }

}




